package com.ftu.study.pattern.state;

/**
 * Created by zhanghr on 2018/12/22.
 */
public class GumballMachineTestDrive {
    public static void main(String[] args) {
        GumballMachine machine = new GumballMachine(5);

        System.out.println(machine);

        machine.insertQuarter();
        machine.turnCrank();
        System.out.println(machine);
        machine.insertQuarter();
        machine.turnCrank();
        System.out.println(machine);
        machine.insertQuarter();
        machine.turnCrank();
        System.out.println(machine);

        machine.insertQuarter();
        machine.ejectQuarter();
        System.out.println(machine);

        machine.insertQuarter();
        machine.turnCrank();
        System.out.println(machine);
        machine.insertQuarter();
        machine.turnCrank();
        System.out.println(machine);

    }

}
